package com.payment.system.domain;

import com.payment.common.annotation.Excel;
import com.payment.common.base.BaseEntity;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

import java.math.BigDecimal;
import java.util.Date;
import java.util.List;

/**
 * 商城订单表 sys_shopping_order
 * 
 * @author payment
 * @date 2019-01-22
 */
public class ShoppingOrder extends BaseEntity
{
	private static final long serialVersionUID = 1L;
	
	/** id */
	private String id;
	/** 订单编号 */
	@Excel(name = "订单编号")
	private String orderNumber;
	/** 商户id */
	private String merchantId;

	@Excel(name = "商户手机号")
	private String merchantPhone;
	//商户名称
	@Excel(name = "商户名称")
	private String merchantName;
	@Excel(name = "推荐人手机号")
	private String parentPhone;
	@Excel(name = "推荐人")
	private String parentName;
	@Excel(name = "代理商")
	private String agentName;


	//商户编号
	private String merchantNo;


	//支付方式(微信，支付宝，银行卡)
	@Excel(name = "支付方式", readConverterExp = "10A=微信,10B=支付宝,10C=银行卡")
	private String payMode;

	/** 支付类型 优选，推荐，普通购买 ，98升级 */
	@Excel(name = "支付类型", readConverterExp = "10A=优选,10B=推荐,10C=普通购买,10C=余额,10E=98升级")
	private String payType;
	//配送状态
	@Excel(name = "配送状态", readConverterExp = "10A=不配送,10B=配送")
	private String delivery;
	/** 订单状态 */
	@Excel(name = "订单状态", readConverterExp = "10A=待支付,10B=已支付,10C=待收货,10D=已收货")
	private String orderStatus;
	/** 快递费 */
	@Excel(name = "快递费")
	private BigDecimal shipmentAmount;

	/** 订单金额 */
	@Excel(name = "订单金额")
	private BigDecimal orderAmount;
	/** 支付金额(订单金额 + 快递费) */
	@Excel(name = "支付金额")
	private BigDecimal payAmount;
	/** 订单积分 */
	@Excel(name = "订单积分")
	private Integer orderScore;
	/** 商品总数量 */
	@Excel(name = "购买数量")
	private Integer buyNumber;
	/** 创建时间 */
	@Excel(name = "创建时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
	private Date createTime;

	private Date updateTime;
	@Excel(name = "支付时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
	private Date paymentTime;
	//删除状态
	private Integer del;

	private Integer number;
	private BigDecimal totalMoney;
	private List<ShoppingOrderProduct> orderProductList;

	public void setId(String id) 
	{
		this.id = id;
	}

	public String getId() 
	{
		return id;
	}
	public void setOrderNumber(String orderNumber) 
	{
		this.orderNumber = orderNumber;
	}

	public String getOrderNumber() 
	{
		return orderNumber;
	}
	public void setMerchantId(String merchantId) 
	{
		this.merchantId = merchantId;
	}

	public String getMerchantId() 
	{
		return merchantId;
	}
	public void setPayMode(String payMode) 
	{
		this.payMode = payMode;
	}

	public String getPayMode() 
	{
		return payMode;
	}
	public void setPayType(String payType) 
	{
		this.payType = payType;
	}

	public String getPayType() 
	{
		return payType;
	}
	public void setShipmentAmount(BigDecimal shipmentAmount) 
	{
		this.shipmentAmount = shipmentAmount;
	}

	public BigDecimal getShipmentAmount() 
	{
		return shipmentAmount;
	}
	public void setOrderStatus(String orderStatus) 
	{
		this.orderStatus = orderStatus;
	}

	public String getOrderStatus() 
	{
		return orderStatus;
	}
	public void setOrderAmount(BigDecimal orderAmount) 
	{
		this.orderAmount = orderAmount;
	}

	public BigDecimal getOrderAmount() 
	{
		return orderAmount;
	}
	public void setPayAmount(BigDecimal payAmount) 
	{
		this.payAmount = payAmount;
	}

	public BigDecimal getPayAmount() 
	{
		return payAmount;
	}
	public void setOrderScore(Integer orderScore) 
	{
		this.orderScore = orderScore;
	}

	public Integer getOrderScore() 
	{
		return orderScore;
	}
	public void setBuyNumber(Integer buyNumber) 
	{
		this.buyNumber = buyNumber;
	}

	public Integer getBuyNumber() 
	{
		return buyNumber;
	}
	public void setCreateTime(Date createTime) 
	{
		this.createTime = createTime;
	}

	public Date getCreateTime() 
	{
		return createTime;
	}
	public void setUpdateTime(Date updateTime) 
	{
		this.updateTime = updateTime;
	}

	public Date getUpdateTime() 
	{
		return updateTime;
	}

    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("id", getId())
            .append("orderNumber", getOrderNumber())
            .append("merchantId", getMerchantId())
            .append("payMode", getPayMode())
            .append("payType", getPayType())
            .append("shipmentAmount", getShipmentAmount())
            .append("orderStatus", getOrderStatus())
            .append("orderAmount", getOrderAmount())
            .append("payAmount", getPayAmount())
            .append("orderScore", getOrderScore())
            .append("buyNumber", getBuyNumber())
            .append("createTime", getCreateTime())
            .append("updateTime", getUpdateTime())
            .toString();
    }

	public String getMerchantNo() {
		return merchantNo;
	}

	public void setMerchantNo(String merchantNo) {
		this.merchantNo = merchantNo;
	}

	public String getMerchantName() {
		return merchantName;
	}

	public void setMerchantName(String merchantName) {
		this.merchantName = merchantName;
	}

	public Integer getDel() {
		return del;
	}

	public void setDel(Integer del) {
		this.del = del;
	}

	public List<ShoppingOrderProduct> getOrderProductList() {
		return orderProductList;
	}

	public void setOrderProductList(List<ShoppingOrderProduct> orderProductList) {
		this.orderProductList = orderProductList;
	}

	public Date getPaymentTime() {
		return paymentTime;
	}

	public void setPaymentTime(Date paymentTime) {
		this.paymentTime = paymentTime;
	}

	public String getDelivery() {
		return delivery;
	}

	public void setDelivery(String delivery) {
		this.delivery = delivery;
	}

	public String getMerchantPhone() {
		return merchantPhone;
	}

	public void setMerchantPhone(String merchantPhone) {
		this.merchantPhone = merchantPhone;
	}

	public String getParentPhone() {
		return parentPhone;
	}

	public void setParentPhone(String parentPhone) {
		this.parentPhone = parentPhone;
	}

	public String getParentName() {
		return parentName;
	}

	public void setParentName(String parentName) {
		this.parentName = parentName;
	}

	public String getAgentName() {
		return agentName;
	}

	public void setAgentName(String agentName) {
		this.agentName = agentName;
	}

	public Integer getNumber() {
		return number;
	}

	public void setNumber(Integer number) {
		this.number = number;
	}

	public BigDecimal getTotalMoney() {
		return totalMoney;
	}

	public void setTotalMoney(BigDecimal totalMoney) {
		this.totalMoney = totalMoney;
	}
}
